package com.controller;

import com.pojo.OrderProject;
import com.service.OrderProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class OrderProjectController {
    @Autowired
    private OrderProjectService orderProjectService;

    @RequestMapping("/insertOrderProject")
    public Object insetOrderProject(OrderProject orderProject){
        return orderProjectService.insertOrderProject(orderProject);
    }

    @RequestMapping("/selectProjectNameByOrderId")
    public Object selectProjectNameByOrderId(long orderId){
        return orderProjectService.selectProjectNameByOrderId(orderId);
    }
}
